﻿@model IEnumerable<DCH.Areas.Admin.Models.Tournament>

@{
    ViewBag.Title = "Tournament List";
}

<h2>Tournament List</h2>

<p>
    @Html.ActionLink("Create New Tournament", "Create")
</p>
<table>
    <tr>
        <th>
            T1 Name
        </th>
        <th>
            T1 Score
        </th>
       
        <th>
           T2 Name
        </th>
        <th>
            T2 Score
        </th>
       
        <th>
            @Html.DisplayNameFor(model => model.Winner)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Date)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Venue)
        </th>
       
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.team1_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.team1_score)
        </td>
       
        <td>
            @Html.DisplayFor(modelItem => item.team2_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.team2_score)
        </td>
        
        <td>
            @Html.DisplayFor(modelItem => item.Winner)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Venue)
        </td>
        
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
